﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="attributes.aspx.cs" Inherits="WebApp.admin.goods.attributes" %>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1"><title>
	
        
</title><link href="../css/skin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/main.js"></script>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/jquery.js"></script>
  <script type="text/javascript">
    ///添加表单选项
    function AddattributesValue() {
        var tb = document.getElementById("attributesValues");
        var length = tb.rows.length;
        newRow = tb.insertRow(length);
        newRow.width = "100%";
        newCell0 = newRow.insertCell(0);
        newCell0.innerHTML = "<input name=\"attributesValue\" type=\"text\"/>";
        newCell1 = newRow.insertCell(1);
        newCell1.innerHTML = "<input type=button class=\"formButton\" value=\"删除\" title=\"删除属性值\" onclick=\"delSVInput(this.parentNode.parentNode.rowIndex);\">";
    }

    ///删除规格值表单选项
    function delSVInput(index) {
        if (confirm("确定要删除吗？")) {
            var tb = document.getElementById("attributesValues");
            document.getElementById("attributesValues").deleteRow(index);
        }
    }


   </script>

  </head>
<body class="body">
    <table class="main" cellpadding="0" cellspacing="0">
      
        <tr>

            <td class="td_middle_middle">
                <div class="maincontent">

<div  class="navgater"><img src="../images/module.gif" width="20" height="22" alt=""/>
所在位置：类型属性->
<%= Request.QueryString["ot"] == "ed" ? "类型属性编辑" : "类型属性添加"%>

<a style=" display:block; float:right;" href="javascript:location.href=document.referrer;" ><img src="../images/history.gif" border="0" /></a>
</div>
                    <form name="form1" id="form1" runat="server">

                        <table cellpadding="0" cellspacing="0" style="width: 100%">
                            <tr>
                                <td class="td_title">
                                    商品类型：</td>
                                <td class="td_content">
                                    <asp:DropDownList ID="selectGoodsType" runat="server"></asp:DropDownList>
                                    *</td>
                            </tr>
                            <tr>
                                <td class="td_title">
                                    属性名称：</td>
                                <td class="td_content">
                                    <input name="txtAttributeName" runat="server" type="text" id="txtAttributeName" />*</td>
                            </tr>
                            <tr>
                                <td class="td_title">
                                    属性类型：</td>
                                <td class="td_content">
                                  <asp:DropDownList ID="selectAttributeInputType"  runat="server"  onchange="displayAttributeValues(this);" >
                                   <asp:ListItem Text="请选择..." Value="-1"></asp:ListItem>
                                   <asp:ListItem Text="文本" Value="0"></asp:ListItem>
                                   <asp:ListItem Text="数字" Value="1"></asp:ListItem>
                                   <asp:ListItem Text="字母" Value="2"></asp:ListItem>
                                   <asp:ListItem Text="单选项" Value="3"></asp:ListItem>
                                   <asp:ListItem Text="多选项" Value="4"></asp:ListItem>
                                   <asp:ListItem Text="日期" Value="5"></asp:ListItem>
                                  </asp:DropDownList>
                                    *    
                                </td>
                            </tr>
                              

                             <tr id="otherAttributeValues" style='display:<%= OtherAttributeShow %>;'>
                                <td class="td_title">
                                    属性值：</td>
                                <td class="td_content">
                                     <input name="otherAttributesValue" runat="server" type="text" id="otherAttributesValue" />*
                                </td>
                            </tr>

       
                              <tr id="AttributeValues" style='display:<%= AttributeShow %>;'>
                                <td class="td_title">
                                    属性值：</td>
                                <td class="td_content">
                                    <input id="addSV" type="button" class="formButton" value="添加属性值" title="添加属性值" onclick="AddattributesValue();" />
                                    <table border="0" cellspacing="0" id="attributesValues" runat="server">
                                        <tr>
                                            <td>
                                                属性值名称</td>
                                            <td>
                                                操作</td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td class="td_title">
                                    排序：</td>
                                <td class="td_content">
                                    <input name="txtSortOrder" type="text" runat="server" id="txtSortOrder" onpaste="return false" style="ime-mode:disabled" onkeypress="if ((event.keyCode&lt;48 || event.keyCode>57||event.keyCode==46)) event.returnValue=false" />*</td>
                            </tr>
                            <tr>
                                <td class="td_title">
                                    是否必填：</td>
                                <td class="td_content">
                                <asp:RadioButtonList ID="rbListRequired"  runat="server" RepeatDirection="Horizontal" Width="100px"  BorderWidth="0px"  BorderStyle="None">
                                <asp:ListItem Text="是" Selected="True" Value="1"  >
                               
                                </asp:ListItem>
                                  <asp:ListItem Text="否"  Value="0"></asp:ListItem>
                                </asp:RadioButtonList>
                                    
                                    </td>
                            </tr>
                            <tr>
                                <td class="td_title">
                                    是否启用：</td>
                                <td class="td_content">

                                 <asp:RadioButtonList ID="rbListState" runat="server" RepeatDirection="Horizontal" Width="100px"  BorderWidth="0px"  BorderStyle="None">
                                <asp:ListItem Text="是" Selected="True" Value="1"  ></asp:ListItem>
                                  <asp:ListItem Text="否"  Value="0"></asp:ListItem>
                                </asp:RadioButtonList>

                            </tr>
                            <tr>
                                <td colspan="2">
                                        <asp:Button ID="bntSubmit" runat="server" Text="确  定" CssClass="formButton" OnClick="btnSubmit_Click"
                                        OnClientClick="return checkAttributesForm();" />&nbsp;&nbsp;&nbsp;&nbsp;
                                   <input id="btnBack" type="button" class="formButton" value=" 返  回 " onclick="javascript:location.href=document.referrer;"  /></td>
                            </tr>
                        </table>
                     </form>
                     </div>

            </td>
    
        </tr>
    
    </table>
</body>
</html>
